<h2>Upload New Torrent</h2>


<?php if(Yii::app()->user->hasFlash('torrentUploaded')): ?>

<div class="info"><?php echo Yii::app()->user->getFlash('torrentUploaded'); ?></div>
<?php Yii::app()->clientScript->registerScript(
   'myHideEffect',
   '$(".info").animate({opacity: 1.0}, 3000).fadeOut("slow");',
   CClientScript::POS_READY
);
?>
<?php endif; ?>

<div class="form">
<?php echo CHtml::errorSummary($form); ?>

<?php echo CHtml::beginForm('', 'post', array('enctype' => 'multipart/form-data')); ?>
<div class="row">
<?php echo CHtml::activeLabel($form,'name'); ?>
<?php echo CHtml::activeTextField($form,'name'); ?>
</div>
<div class="row">
<?php echo CHtml::activeLabel($form,'description'); ?>
<?php echo CHtml::activeTextArea($form,'description',array('rows'=>20, 'cols'=>50)); ?>
</div>
<div class="row">
<?php echo CHtml::activeFileField($form, 'torrentfile'); ?>
<?php echo CHtml::error($form,'torrentfile'); ?>
</div>
<br />
<div class="row">
<?php echo CHtml::submitButton('Upload'); ?>
</div>
<?php echo CHtml::endForm(); ?>

</div>